<?php
/**
 * File name : m_entertaiment
 * 
 * @package Developer System Site
 * @author VSOFT Dev Team
 * @copyright 2012
 * @version 1.0
 */
class m_entertaiment extends CI_Model
{
    public function __construct()
    {
        parent::__construct();
    }
    
    public function insert($dataArray)
    {
        $this->db->insert('entertaiment',$dataArray);
    }
    
    
    public function update($id,$dataArray)
    {
        $this->db->where('identertaiment',$id);
        $this->db->update('entertaiment',$dataArray);
    } 
    
    public function delete($id)
    {
        $this->db->delete('entertaiment',array('identertaiment'=>$id));
    }
     
    public function getData($id = '')
    {
        if(isset($id) == '')
        {
            $query = $this->db->get('entertaiment');
            return $query->result_array();            
        }else{
            $query = $this->db->get_where('entertaiment',array('identertaiment' => $id));
        }

    }
}
?>                
